package org.dreamwork.jasmine2.engine;

/**
 * Created by IntelliJ IDEA.
 * User: seth.yang
 * Date: 2010-12-9
 * Time: 23:32:15
 */
public class Browser {

/*
var BROWSER = (function () {
	var text = window.navigator.userAgent;
	if (text.indexOf ('MSIE') != -1)
	{
		if (text.indexOf ('MSIE 6.0') != -1)
		{
			return { isIE6 : true, isIE : true }
		}
		return { isIE : true }
	}
	if (text.indexOf ('Chrome') != -1)
	{
		return { isChrome : true, isWebKit : true }
	}
	if (text.indexOf ('Safari') != -1)
	{
		return { isSafari : true, isWebKit : true }
	}
	if (text.indexOf ('Firefox') != -1)
	{
		return { isFirefox : true, isGecko : true }
	}
}) ();
Opera/9.80 (Windows NT 5.1; U; zh-cn) Presto/2.6.30 Version/10.63
*/

    public final boolean isIE;
    public final boolean isIE6;
    public final boolean isIE7;
    public final boolean isIE8;
    public final boolean isIE9 = false;
    public final boolean isGecko;
    public final boolean isFirefox;
    public final boolean isWebKit;
    public final boolean isChrome;
    public final boolean isSafari;
    public final boolean isOpera;
    public final boolean isPresto;

    Browser (String userAgent) {
        isIE6 = userAgent.indexOf ("MSIE 6.0") != -1;
        isIE7 = userAgent.indexOf ("MSIE 7.0") != -1;
        isIE8 = userAgent.indexOf ("MSIE 8.0") != -1;
        isIE = isIE6 || isIE7 || isIE8;
        isChrome = userAgent.indexOf ("Chrome") != -1;
        isGecko = isFirefox = userAgent.indexOf ("Firefox") != -1;
        isSafari = userAgent.indexOf ("Safari") != -1;
        isWebKit = isChrome || isSafari;
        isOpera = userAgent.indexOf ("Opera") != -1;
        isPresto = userAgent.indexOf ("Presto") != -1;
    }
}